num1 = 13
num2 = 16.987
print("宽度3，结果是%3d"%num1)
print("宽度1，结果是%1d"%num1)
print("宽度5，小数精度2，结果是%5.2f"%num2)
print("宽度7，小数精度1，结果是%7.1f"%num2)
print("小数精度2，结果是%.2f"%num2)